<template>
    <framework
            :navData="navData"
            @changeView="changeView">
        <router-view slot="body"></router-view>
    </framework>
</template>

<script>
    import framework from '@modules/common/framework.vue';

    export default {
        name: "index",
        data () {
            return {
                navData: [
                    {
                        title: "学生信息管理",
                        id: "0",
                        children: [
                            {
                                title: "学生概览",
                                id: "0_0",
                                name: "manageStudentOutline"
                            },
                            {
                                title: "学生录入",
                                id: "0_1",
                                name: "manageStudentTypeIn"
                            }
                        ]
                    },{
                        title: "课程信息管理",
                        id: "1",
                        children: [
                            {
                                title: "课程简介",
                                id: "1_0",
                                name: "manageCourseDescription"
                            },
                            {
                                title: "课程公告",
                                id: "1_1",
                                name: "manageCourseNotice"
                            },
                            {
                                title: "教学计划",
                                id: "1_2",
                                name: "manageCoursePlan"
                            },
                            {
                                title: "参考书目",
                                id: "1_3",
                                name: "manageCourseReference"
                            },
                            {
                                title: "考核方式",
                                id: "1_4",
                                name: "manageCourseEvaluation"
                            },
                            {
                                title: "课程资源",
                                id: "1_5",
                                name: "manageCourseResource"
                            }
                        ]
                    },{
                        title: "作业发布与互评管理",
                        id: "2",
                        children: [
                            {
                                title: "作业概览",
                                id: "2_0",
                                name: "homeworkPublishOutline"
                            },
                            {
                                title: "布置作业",
                                id: "2_1",
                                name: "homeworkPublishPublish"
                            }
                        ]
                    },{
                        title: "作业评阅",
                        id: "3",
                        children: [
                            {
                                title: "作业概览",
                                id: "3_0",
                                name: "homeworkReadOutline"
                            }
                        ]
                    },{
                        title: "成绩管理",
                        id: "4",
                        children: [
                            {
                                title: "成绩组成设置",
                                id: "4_0",
                                name: "manageScoreComposition"
                            },
                            {
                                title: "成绩概览",
                                id: "4_1",
                                name: "manageScoreOutline"
                            }
                        ]
                    },
                ]
            }
        },
        components: {
            framework
        },
        methods: {
            changeView (name) {
                this.$router.push({
                    name: name
                });
            }
        }
    }
</script>

<style type="text/scss" lang="scss">

</style>